package core.price.model;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="price")
public class Price implements Serializable
{
		private static final long serialVersionUID = -8778945643261247L;
		private Long uuid;
		private float price;
		private float specialprice;
		private Date startdate;
		private Date enddate;
		private PriceType priceType ;
		private String comment ;
		private Long productId ;
		
		
		@Id
		@GeneratedValue
		@Column(name="uuid")
		public Long getUuid() {
			return uuid;
		}
		@ManyToOne(cascade = CascadeType.ALL)
		public PriceType getPriceType() {
			return priceType;
		}
		public void setPriceType(PriceType priceType) {
			this.priceType = priceType;
		}
		@Column(name="price")
		public float getPrice() {
			return price;
		}
		@Column(name="specialprice")
		public float getSpecialprice() {
			return specialprice;
		}
		@Column(name="startdate")
		public Date getStartdate() {
			return startdate;
		}
		@Column(name="enddate")
		public Date getEnddate() {
			return enddate;
		}
		public void setPrice(float price) {
			this.price = price;
		}
		public void setSpecialprice(float specialprice) {
			this.specialprice = specialprice;
		}
		public void setEnddate(Date enddate) {
			this.enddate = enddate;
		}
		public void setStartdate(Date startdate) {
			this.startdate = startdate;
		}
		public void setUuid(Long uuid) {
			this.uuid = uuid;
		}
		@Column(name="comment")
		public String getComment() {
			return comment;
		}
		public void setComment(String comment) {
			this.comment = comment;
		}
		@Column(name="productid")
		public Long getProductId() {
			return productId;
		}
		public void setProductId(Long productId) {
			this.productId = productId;
		}
}
